DescribeMetricRuleCount
Description
call the DescribeMetricRuleCount interface to obtain the number of various state alarm rules.
Request Method
POST
Request Path
/apsara/route/cms/DescribeMetricRuleCount
Request Parameters Common Parameters
| Name | Location | Type | Required | Sample value | Description |
|---|---|---|---|---|---|
| MetricName | BODY | string | No | cpu_total | monitoring item name to query . |
| regionId | BODY | string | Yes | No sample value for this parameter. | region id |
| version | BODY | string | No | 2016-01-01 | version of api |
| Namespace | BODY | string | No | acs_ecs_dashboard | the data namespace of the product can be obtained by querying the DescribeMetricMetaList interface . |
Return data
| Name | Type | Sample value | Description |
|---|---|---|---|
| MetricRuleCount | none | None | statistics on the number of alarm rules in various states. |
| Message | string | The Request is not authorization. | error message. |
| RequestId | string | FF38D33A-67C1-40EB-AB65-FAEE51EDB644 | request ID, used to troubleshoot problems. |
| Alarm | integer | 5 | number of rules for alarm status. |
| Total | integer | 45 | the total number of alarm rules. |
| OK | integer | 40 | the number of rules in the normal state. |
| Code | string | 200 | status code, 200 indicates success. |
| Disable | integer | 0 | the number of disabled. |
| Nodata | integer | 0 | number of rules without data. |
| Success | boolean | true | whether it was successful. |
Example
Successful Response example
{
"MetricRuleCount":"None",
"Message":"The Request is not authorization.",
"RequestId":"FF38D33A-67C1-40EB-AB65-FAEE51EDB644",
"Alarm":"5",
"Total":"45",
"OK":"40",
"Code":"200",
"Disable":"0",
"Nodata":"0",
"Success":"true"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}